package com.wholesale.utils;

import android.view.View;
import android.widget.TableRow;
import android.widget.TextView;

import com.wholesale.R;

public class MyOrderCache {
	private View baseView;
	private TextView numberView;
	private TextView timeView;
	private TextView totalView;
	private TextView shouldPayView;
	private TextView statusView;
	private TextView operateView;
	private TableRow shouldPayRow;
	private TextView paidTimeView;

	public MyOrderCache(View baseView) {
		this.baseView = baseView;
	}

	public TextView getNumberView() {
		if (numberView == null) {
			numberView = (TextView) baseView.findViewById(R.id.number_text);
		}
		return numberView;
	}

	public TextView getTimeView() {
		if (timeView == null) {
			timeView = (TextView) baseView.findViewById(R.id.time_text);
		}
		return timeView;
	}

	public TextView getTotalView() {
		if (totalView == null) {
			totalView = (TextView) baseView.findViewById(R.id.total_text);
		}
		return totalView;
	}

	public TextView getShouldPayView() {
		if (shouldPayView == null) {
			shouldPayView = (TextView) baseView
					.findViewById(R.id.shouldpay_text);
		}
		return shouldPayView;
	}

	public TextView getStatusView() {
		if (statusView == null) {
			statusView = (TextView) baseView.findViewById(R.id.status_text);
		}
		return statusView;
	}

	public TextView getOperateView() {
		if (operateView == null) {
			operateView = (TextView) baseView.findViewById(R.id.operate_text);
		}
		return operateView;
	}
	
	public TextView getPaidTimeView() {
		if (paidTimeView == null) {
			paidTimeView = (TextView) baseView.findViewById(R.id.paidTime_text);
		}
		return paidTimeView;
	}


	public TableRow getShouldPayRow() {
		if (shouldPayRow == null) {
			shouldPayRow = (TableRow) baseView
					.findViewById(R.id.tableRowShouldPay);
		}
		return shouldPayRow;
	}
}
